#得到数据返回beautifulsoup对象
# def getDates(url):
#     # headers={
#     # 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36',
#     # 'Referer': ''
#     # }
#     response=requests.get(url=url)
#     #切换到console标签，输入document.charset,得到网页的编码模式
#     # response.encoding='gbk'
#     # print(response.text)
    
#     # with open('text.html','w') as f:
#     #     f.write(response.text)

#     bs=BeautifulSoup(response.text,'lxml')
    
#     return bs


#语用下载
# def download(link,name,lx):
#     if os.path.exists(name+'.'+lx) == False: 
#         urlretrieve(link, './'+name+'.'+lx) 
#     else:
#         pass
